3.379 \(\int \sec (c+d x) (a+b \sin (c+d x)) \, dx\)

Optimal. Leaf size=43 \[ \frac {(a-b) \log (\sin (c+d x)+1)}{2 d}-\frac {(a+b) \log (1-\sin (c+d x))}{2 d} \]

[Out]

-1/2*(a+b)*ln(1-sin(d*x+c))/d+1/2*(a-b)*ln(1+sin(d*x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2668, 633, 31} \[ \frac {(a-b) \log (\sin (c+d x)+1)}{2 d}-\frac {(a+b) \log (1-\sin (c+d x))}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]*(a + b*Sin[c + d*x]),x]

[Out]

-((a + b)*Log[1 - Sin[c + d*x]])/(2*d) + ((a - b)*Log[1 + Sin[c + d*x]])/(2*d)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 633

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[e/2 + (c*d)/(2*q),
Int[1/(-q + c*x), x], x] + Dist[e/2 - (c*d)/(2*q), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[-(a*c)]

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \sec (c+d x) (a+b \sin (c+d x)) \, dx &=\frac {b \operatorname {Subst}\left (\int \frac {a+x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {(a-b) \operatorname {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}+\frac {(a+b) \operatorname {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}\\ &=-\frac {(a+b) \log (1-\sin (c+d x))}{2 d}+\frac {(a-b) \log (1+\sin (c+d x))}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 26, normalized size = 0.60 \[ \frac {a \tanh ^{-1}(\sin (c+d x))}{d}-\frac {b \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]*(a + b*Sin[c + d*x]),x]

[Out]

(a*ArcTanh[Sin[c + d*x]])/d - (b*Log[Cos[c + d*x]])/d

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 37, normalized size = 0.86 \[ \frac {{\left (a - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (a + b\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/2*((a - b)*log(sin(d*x + c) + 1) - (a + b)*log(-sin(d*x + c) + 1))/d

________________________________________________________________________________________

giac [A]  time = 0.75, size = 37, normalized size = 0.86 \[ \frac {{\left (a - b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - {\left (a + b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/2*((a - b)*log(abs(sin(d*x + c) + 1)) - (a + b)*log(abs(sin(d*x + c) - 1)))/d

________________________________________________________________________________________

maple [A]  time = 0.10, size = 34, normalized size = 0.79 \[ -\frac {b \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)*(a+b*sin(d*x+c)),x)

[Out]

-1/d*b*ln(cos(d*x+c))+1/d*a*ln(sec(d*x+c)+tan(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 35, normalized size = 0.81 \[ \frac {{\left (a - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (a + b\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/2*((a - b)*log(sin(d*x + c) + 1) - (a + b)*log(sin(d*x + c) - 1))/d

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 54, normalized size = 1.26 \[ -\frac {\frac {a\,\ln \left (\sin \left (c+d\,x\right )-1\right )}{2}-\frac {a\,\ln \left (\sin \left (c+d\,x\right )+1\right )}{2}+\frac {b\,\ln \left (\sin \left (c+d\,x\right )-1\right )}{2}+\frac {b\,\ln \left (\sin \left (c+d\,x\right )+1\right )}{2}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(c + d*x))/cos(c + d*x),x)

[Out]

-((a*log(sin(c + d*x) - 1))/2 - (a*log(sin(c + d*x) + 1))/2 + (b*log(sin(c + d*x) - 1))/2 + (b*log(sin(c + d*x
) + 1))/2)/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+b*sin(d*x+c)),x)

[Out]

Integral((a + b*sin(c + d*x))*sec(c + d*x), x)

________________________________________________________________________________________